class Solution:
    def maxArea(self, height: List[int]) -> int:
        left=0
        right=len(height)-1
        zhi=0
        while left<right:
       
            if height[left]<height[right]:
                v = height[left]*(right-left)
                left+=1
            else:
                v = height[right]*(right-left)
                right-=1
            zhi=max(zhi,v)
        return zhi
